![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Is there a way to find out if a Sub exists.
I know I can use an errorlabel to catch undefined callSubs, but I'm looking for a clean way to find out the existence of a sub. One problem using the errorlabel cause the program to loop, but this is probably because the errorlabel itself is in the If stucture: Quote:
Scub.
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless Last edited by Scubaticus : 11-03-2007 at 10:33 PM. |
|
|||
|
Quote:
Now when I ad a sub, or remove it I also have to keep track of the array values. It would be nice if there was some kind of "if exist" (sub, control, etc.) Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless |
|
||||
|
Still I agree with Erel.....
I do can see your point, but beeing a sub a must know thing in your app, it's easyer to create an array and update it... It would be nice to have a "special" array with all the subs names automatically updated when project was saved...
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
|||
|
Well, yes and no. Of course, it's a good thing to know your subs. But I work with "objects" and one of it's properties is used as a special sub-call. But it does not need to exist.
Life would become easier (just like the function_exists in PHP for example). I'm just missing the check of existence. The controls for example. Do you put all your controls in array? I don't, but trying to set a control, because you use a template for example, which does not exist causes an error to rise. And yes to catch those errors errorlabel could be used, but I think the errorlabel thing is not what it should be. I'm not interested if an error somewhere in my sub occurs, but do if it's on a specific statement. Now I have to define a whole new sub just to catch these kind of errors...... Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Check for duplicates | moster67 | Questions & Help Needed | 2 | 09-07-2008 07:58 AM |
| How can I check database is opened? | fishworld2006 | Questions & Help Needed | 2 | 08-29-2008 10:18 AM |
| How to check if Form is active | Mr_Gee | Questions & Help Needed | 5 | 05-07-2008 04:00 PM |
| Treeview and check-boxes | BjornF | Questions & Help Needed | 2 | 06-26-2007 04:45 PM |
| How to check whether .Net CF 2.0 is installed correctly | Erel | Code Samples & Tips | 3 | 05-18-2007 03:59 PM |