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

Meldung: Local variable cannot hide a global variable

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-18-2009, 09:54 AM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Unhappy Meldung: Local variable cannot hide a global variable

Hallo,

nach langer Zeit melde ich mich mal wieder mit folgendem Problem:

Ich möchte den Inhalt von einigen Zellen aus einer Tabelle in Textfelder einfügen.

Dazu möchte ich den Befehl "SelectionChanged" verwenden.

Code:
'----------------------------------------------------
'
Wenn in die Tabelle "V-Mat-Kunde suchen" geklickt wird:
'
----------------------------------------------------
Sub TabelleVMatKundeSuchen_SelectionChanged (ColName, Row)
VMatAusbuchenAnKundenNummer.Text = TabelleVMatKundeSuchen.Cell (
"KD-Nr.", TabelleVMatKundeSuchen.SelectedRow)
VMatAusbuchenAnKunde.Text = TabelleVMatKundeSuchen.Cell (
"Kunde", TabelleVMatKundeSuchen.SelectedRow)
VMatAusbuchen.Show
End Sub
'----------------------------------------------------
Leider erhalte ich folgende Fehlermeldung schon beim Start des Programmes:

Quote:
Local variable cannot hide a global variable
Wo liegt das Problem?

Bin für jede Hilfe oder Hinweis dankbar!
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #2 (permalink)  
Old 07-18-2009, 11:42 AM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 993
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hallo Jotha,

die Fehlermeldung erhält man u.a., wenn man als Paramter einer Sub einen Variablennamen verwendet, denn man schon in Bereich "Sub Globals" verwendet hat.
Ich tippe daher mal darauf, dass Du hier eine globale Variable "ColName" oder "Row" definiert hast. In diesem Fall kann man einfach die Parameter der (lokalen) Sub abändern, z.B.:
Code:
Sub TabelleVMatKundeSuchen_SelectionChanged (ColNameNew, RowNew)
Damit sollte das Problem behoben sein.


Gruß
specci48
Reply With Quote
  #3 (permalink)  
Old 07-18-2009, 12:34 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Thumbs up DANKE - es funzt!

Hallo specci48,
Quote:
Originally Posted by specci48 View Post
... die Fehlermeldung erhält man u.a., wenn man als Paramter einer Sub einen Variablennamen verwendet, denn man schon in Bereich "Sub Globals" verwendet hat.
... genau so ist es!

Es funzt jetzt!

VIELEN DANK!
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
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
For/Next with changeable variable. enonod Questions (Windows Mobile) 4 07-12-2009 08:15 PM
variable address robert black Questions (Windows Mobile) 2 12-24-2008 09:53 PM
Help on getting variable jeterry Questions (Windows Mobile) 2 11-11-2008 11:09 PM
Dim variable c% as Double colin9876 Basic4ppc Wishlist 8 05-28-2008 02:26 PM
LoadCSV from a variable nsidney Questions (Windows Mobile) 7 01-30-2008 02:29 AM


All times are GMT. The time now is 05:07 AM.


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