User Defined Data Properties

General discussions on potential enhancements to the APL+Win system.

User Defined Data Properties

Postby Ajay Askoolum » March 3rd, 2011, 1:31 pm

I have not managed to assign an object to a user defined data property of the system object AND then use it as an object; the assignment works but any attempt to use it fails:

Code: Select all
⎕WI CREATION ERROR: Invalid object pointer


It would be handy to hold all instances of general purpose objects as children of the system object: this will make it possible to manage all the objects in specific functions e.g. initialization, error handler, application exit ec.

Can this be implemented?
Ajay Askoolum
 
Posts: 641
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Postby Tech Support » March 3rd, 2011, 4:35 pm

Please provide one or more examples of the enhancement you've requested.
Tech Support
 
Posts: 1133
Joined: February 10th, 2007, 7:33 am
Location: Rockville, MD

Postby Ajay Askoolum » March 3rd, 2011, 5:44 pm

There are inumerable COM objects on the Windows platform that expose generic utilities that can be very useful (time-saving) for APL+Win application development.

Some examples are Scripting.FileSystemObject, Shell.Application, Shell.Explorer, IExplore.Application etc.

The methods and properties of any such COM object can be used/called from any context within an application. Each call has to establish whether the object exists and if not, it has to create it first; this adds an unnecessary overhead, I think, and introduces the likelihood of a name clash.

I am envisaging a scenario whereby a function at application startup creates any or all these objects; likewise at application exit, another function releases all of these objects.

This is possible now, obviously. However, each such object becomes a child of the system object ... to me this looks like clutter that requires management. I would like these objects to be contained within the '#' class itself and not be enumerated as its children.

I'd like to be able to do the following:

[code]'#' ⎕wi '∆sa' (⎕wi 'Create' 'Shell.Application') â
Ajay Askoolum
 
Posts: 641
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Postby Tech Support » March 3rd, 2011, 6:56 pm

When executing the first statement, you should have been able to tell from the error message reported by APL+Win:
Code: Select all
⎕WI OBJECT ERROR: Current object undefined
what was responsible for the failure, which is you hadn't given the name for the object to be created (in the argument).
The following:
Code: Select all
'#' ⎕wi '∆shell' ('shell' ⎕wi 'Create' 'Shell.Application')
does work as demonstrated below:
Code: Select all
      '#' ⎕wi '∆shell' ('shell' ⎕wi 'Create' 'Shell.Application')
      ('#' ⎕wi '∆shell') ⎕wi 'methods'
 Close Create Defer Delete EnumEnd EnumNext EnumStart Event Exec Info Modify New
       Open Ref Send Set SetLinks XExplorerPolicy XGetSetting XToggleDesktop XWi
      ndowsSecurity
      ('#' ⎕wi '∆shell') ⎕wi '?XToggleDesktop'
XToggleDesktop method:
  ⎕WI 'XToggleDesktop'
Raise/lower the desktop
Tech Support
 
Posts: 1133
Joined: February 10th, 2007, 7:33 am
Location: Rockville, MD

Postby Ajay Askoolum » March 4th, 2011, 2:09 am

Code: Select all
 '#' ⎕wi '∆shell' ('shell' ⎕wi 'Create' 'Shell.Application')

Not quite what I had in mind because:

1 The udp holds a string value, namely the literal 'shell'.
2. As a result, if the object 'shell' is deleted,

Code: Select all
('#' ⎕wi '∆shell') ⎕wi 'methods'

no longer works.

I would like the udp to hold an object pointer without the need to create an object as a child of # when the udp is assigned.

In other words, I'd like a collections object in # that will hold object pointers.
Ajay Askoolum
 
Posts: 641
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Postby Tech Support » March 6th, 2011, 11:53 pm

Thanks for clarifying your enhancement request. The current implementation of the upd property doesn't support an object pointer. We will put this on the list to research and try to determine if there is broad appeal for this enhancement.

Thanks,
Tech Support
 
Posts: 1133
Joined: February 10th, 2007, 7:33 am
Location: Rockville, MD


Return to APL+Win Wish-List

Who is online

Users browsing this forum: No registered users and 1 guest

cron