Multiple choice key value (OpenInsight 32-Bit)
At 20 MAR 2006 08:29:43PM David A Kralman wrote:
OI version 7.2
What I want to do, is allow the user to choose the key value in an OI form. It can be an index lookup, the key of the previous record for redisplay, or a sequential number for a new record, but if it is a sequential number, I want to prefix it with a letter. Of course they can still type in the key value if they know it.
I can get it to do the index lookup, and one of the other two, but not both. I was able to do all 3 with Rev G.
David Kralman
At 20 MAR 2006 11:09PM dsig _at_ sigafoos.org wrote:
first off .. this isn't rev g .. having said that ..
you can do an index lookup (options)
you could define a key for last record id. Use CHAR event. You will have to save off the last id .. in a write event? or however you want to to do it
you could use either a promoted event or script for lostfocus and if you have a default of say then your event script get the next number and append the data then forward on the event ..
At 21 MAR 2006 11:40AM Gerald Lovel wrote:
David,
I believe I have five key assignment processes in my OI forms:
* Pressing displays the last key (the last entry in any control),
* Pressing displays options, which would include an indexed lookup in certain key controls,
* Typing an entry ending in the dollar sign ($) does a name cross-reference metaphonic lookup,
* Pressing when a default value of SEQUENCED is displayed generates a sequential key, and
* Entering an existing/new identifier displays/starts a record.
Yes, my sequential key routine accepts character prefixes. My software provides multiple data volumes for an application, and has utilities to move accounts from one database to another. To avoid transaction number collisions and the subsequent loss of data, transaction numbers are preceded with a source volume designator.
Options and Last Paste are features of AREV, transplanted to OI, but OI has always supported Option events. The metaphonic name cross-reference triggered by a $-sign came from an AREV tip. Expanded sequence key functionality came from – well, lets not start that!
I do not see what Rev-G versus OI has to do with this. When I started working with OI, I thought it was limited compared to AREV. This was a perspective problem, as I had spent 10 years extending AREV while working around its limitations and vagarities. Admittedly there are places where OI seems to offer less than AREV, maybe even less than Rev-G. But what OI offers that AREV and Rev-G did not is openness.
For example, AREV and Rev-G had security models which half worked, while OI lets the developer write his own security system. Rather than viewing this as a limitation, I see the opportunity to integrate security with my application the way I always wanted to. Possibly your desire for more options at entries is just another such opportunity.
At 21 MAR 2006 01:37PM David A Kralman wrote:
Thanks Gerald and DSig, those are good suggestions, and I will pursue those approaches.
I probably shouldn't have mentioned Rev G, but some things seemed much easier with G. Of course it is a matter of familiarity. Once I get to know OI as well as I know G, these issues will no longer bother me.
At 21 MAR 2006 03:03PM dsig _at_ sigafoos.org wrote:
there are things that were much easier with g and arev .. but being event driven has taken some of that away but brought us other things.
It is the learning curve that kills but just keep in mind that the light rushing to you isn't really a train .. well it could be
There is a great article on Sprezzatura.com on promoted events and another one on srpcs.com.
You might want to start boning up on that ..
At 21 MAR 2006 04:04PM Gerald Lovel wrote:
David,
DSig only hints at part of the issue with OI. Because OI is event-driven in the context of the Windows event loop, the design of OI software is like none of the DOS products which preceded it. At first I found it impossible to accomplish my design goals in OI's event context. Now it is only difficult – but, my design goals are much more ambitious than they were in AREV. I have learned how to reduce the complexity of the user interface and increase functionality in OI. Central to this is taking charge of event processing.
DSig hinted at this with references to Sprez and SRP web sites. These two sites have tutorials on developing promoted events, which allow you to design generic behavior for windows and controls. Also, look at other applications, such as the EDI*Atlas demo on the next WORKS CD. (Please excuse the self-promotion here, I am making a point.) When I started with OI, I did not know what OI was capable of and so I could not make good decisions about program design.
The best way to learn about good design is through example. Also, this forum is attended by many willing teachers who will answer your questions. Good luck.
Gerald