But to use this function, you need to know the graphic’s unique ID. To get the unique ID, I suppose you use:
myvar2= objectinfo("id", ID, "Form_A, mydatabase)
But to use THAT function, you also need to know the graphic’s unique ID. Circular reasoning.
The Help says one could substitute the “name” of the object instead of the ID, but you don’t know the name of the object beforehand. And you can’t use objectinfo to find out the name, unless you know the unique ID!!!
There must be an easy answer to this, but I can’t see it.
That name is now permanent and can be used in any procedure into the future and it will not change unless you change it yourself. The ID can change if other objects are deleted from the form so it is best to use the name you have given the object even if you know the current ID.
If you’re looking to write a generic procedure, that you can use on whichever form is currently active, your best approach would probably be to use the formblueprint statement to put the form’s blueprint in a variable. You could then use the tagdata( and tagarray( functions to extract whatever properties you are looking for.
Another touch if it’s generic, but depends on how your procedure is triggered, is to use SetTrigger in the Procedure panel of your trigger. There you can enter the name of the object you want to adjust.
Actually, I already found that feature. But, the blueprint form does not identify or describe the graphics already on the form. And so it doesn’t give the unique ID of the graphic.
I’m beginning to think PanX does not have a way to generically access a property of a form’s graphics. An object’s property can only be accessed with the ID, which can’t be accessed without the ID, which can’t be …etc
I can’t see how anyone can use the OBJECTINFO
I can’t see what the objectinfo function can ever accomplish in a procedure. You have to first know the ID (or the name) of the object to use the function. But how would you know that at the start of the macro?
There is no procedures property associated with the objectinfo( function, only procedure (singular). I think, however, that you may be providing a clue as to what you are actually trying to do. Do you want to find out the code associated with ALL the objects in your form? If that is what you want to do, you’ll need to use the objectinfoarray( function.
Everyone above trying to help you is handicapped by the fact that you haven’t actually told us why you want to access the procedure code. I think you need to tell us that if you want useful assistance.
That’s completely incorrect.
Also, by the way, you would never want to put an object ID number into your code, because those numbers aren’t permanent. You can find out an object ID with objectinfoarray( or info(“clickedobjectid”), but then you should only use that ID immediately and then throw it away.
If you want to permanently reference a particular object, you should give it a name and reference it by name. But it sounds like that isn’t what you want to do.
When I enter graphics mode and call up “Entire Blueprint”, the image below appears. This particular form has only one graphic (it’s a button), but it DOES have an associated procedure. But the blueprint window below is different from the image you show above. My window doesn’t have a “procedures” entry.
No, but if you scroll down, you will find a “PROCEDURE” entry.
Note, however, that the blueprint isn’t really going to help you. Yes, you could find out what the current ID of the object is, but you don’t want to use that number, since it may change when the form is edited.
Yep. There it is. You’d think this is the first time I used a computer.
Jim, you know what would be a good idea? A new function that would create a text array of all the IDs on a form. PanX must have some sort of internal register with this information - how else would the onjectinfo functions work? Would this function be difficult to make?
With such a function, one could load the ID text array into a variable, and with subsequent ARRAYFILTER commands, create arrays with information about all the forms objects, using as the ID parameter the associated element from the ID array. Names, class, color, etc, would be available for all objects. And the beauty is that if an ID changes, for whatever reason, it would not affect the other arrays. Everything will still give the same result, because the ID array will automatically adjust. One doesn’t need to “know” what the ID is. You only need the ID in a list.
Maybe this is not something that most users want. Anyway, I propose it for your consideration.