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

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Modules and Events

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-04-2009, 09:45 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default Modules and Events

HI, trying to keep a "clean house", i created several modules in my app...
One of wich is in charge of initializing and setting Objects....
These Objects are ALL used in others forms...
How can I use an event in a module were the Object was NOT created?
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #2 (permalink)  
Old 01-04-2009, 11:38 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Use AddEvent?
Reply With Quote
  #3 (permalink)  
Old 01-04-2009, 12:15 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

As a workaround I'm "delegating" the event from the dolule who "Owns" the object and call a sub on the module I wish to trigger...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #4 (permalink)  
Old 01-04-2009, 05:24 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

As agraham wrote you can use AddEvent to use a sub in a different module as the event sub.
Reply With Quote
  #5 (permalink)  
Old 01-04-2009, 05:31 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

That would sometime be troubling as if we only have "Working" Subs and no 2initialization" Sub, the addevent keyword will error out...
I will post this in wish list...The possability of turning an event "Public"..
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #6 (permalink)  
Old 01-04-2009, 05:44 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Cableguy View Post
we only have "Working" Subs and no 2initialization" Sub
You can put initialisation code in Globals in each module - works quite well for me. As far as I know there is no limitation on what you can do there.
Quote:
the addevent keyword will error out...
Why?
Reply With Quote
  #7 (permalink)  
Old 01-04-2009, 06:31 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
Originally Posted by agraham View Post
Why?
You would be adding an event that had already benn added...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
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
FormLib and modules Cableguy Questions (Windows Mobile) 3 10-23-2008 09:26 PM
Designer with modules derez Beta Versions 3 09-18-2008 05:02 PM
Modules - more information Erel Beta Versions 4 09-02-2008 05:42 AM
textBox : add TextChanged events or other events abys Code Samples & Tips 1 09-01-2008 06:41 PM
Unhiding hidden modules? agraham Beta Versions 0 08-27-2008 06:14 PM


All times are GMT. The time now is 03:38 AM.


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