Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Foreign Languages > German Forum
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Falsches Layout abfangen

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-30-2012, 03:10 PM
Knows the basics
 
Join Date: Jul 2011
Posts: 65
Default Falsches Layout abfangen

Hallo,

ich habe mein Spiel in verschiedene Layouts unterteilt.
Jetzt kann es aber sein, dass ich eine Funktion aufrufe, die auf das Label eines Layouts zugreift, das im Augenblick nicht angezeigt wird. Kann ich das irgendwie abfangen?
Ich habe es so versucht:

If (Label_Anzahl_Waffe_1 <> Null) Then
Label_Anzahl_Waffe_1.Text = "x"&waffenAnzahl(0)
End If

Das hat aber leider nicht funktioniert.
Geht das anders irgendwie oder gar nicht?

Tschau und schonmal danke für eure Hilfe!
Reply With Quote
  #2 (permalink)  
Old 01-30-2012, 04:44 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hallo Nachtfalke75,

probiere mal so:
Code:
If Label_Anzahl_Waffe_1.IsInitialized Then
    Label_Anzahl_Waffe_1.Text = 
"x"&waffenAnzahl(0)
End If
denn wenn das Layouts geladen ist dann ist dein Label auch initialisiert.


Ciao,
Filippo
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #3 (permalink)  
Old 02-02-2012, 03:38 PM
Knows the basics
 
Join Date: Jul 2011
Posts: 65
Default

Quote:
Originally Posted by Filippo View Post
Hallo Nachtfalke75,

probiere mal so:
Code:
If Label_Anzahl_Waffe_1.IsInitialized Then
    Label_Anzahl_Waffe_1.Text = 
"x"&waffenAnzahl(0)
End If
denn wenn das Layouts geladen ist dann ist dein Label auch initialisiert.


Ciao,
Filippo
Danke, das hat geklappt!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Once again Layout Issue junaidahmed Basic4android Updates and Questions 1 01-04-2012 07:28 AM
Layout values of an unloaded layout? Kevin Basic4android Updates and Questions 1 08-26-2011 02:22 AM
Same Layout for different panels? corwin42 Basic4android Updates and Questions 5 07-28-2011 07:41 AM
Problem with Layout billborric Basic4android Updates and Questions 2 07-10-2011 06:57 AM
Error CS0159 beim "Abfangen" einer Fehlermeldung JOTHA German Forum 6 11-09-2010 07:26 AM


All times are GMT. The time now is 06:57 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0