----boundary-LibPST-iamunique-277281651_-_-
Content-type: text/plain
Doug:
not sure I am getting your point. I compiled the module and ran the form
builder on it, and I got a form with the button "Update" but the data
fields are not there. I can press the Update but where is the data?
Not sure that I agree with the "poor design" statement, either. In your
original posting you quoted a "GUI PRINCIPLE", but who wrote that
principle and why should it be followed? The first time around I misread
the title as a "GUT PRINCIPLE" and I smiled because it does read like a
"gut feeling principle" to me. It looks sort of arbitrary to me.
My bottom line is that the forms and interactors work. This part of BB
does not cause any headache to me, so why should it be criticised?
W.
> Wojtek,
> Bottom line. Its a poor design.
>
> By the way, you needn't copy dynamically created records since you can
> always dereference a pointer. I just tried the following example and it
> works. Notice the embedded pointer within the top level record. The
> fields of the associated form are Foo.p.byte and Foo.p.p.byte and they
> are updated correctly.
>
> MODULE Foo;
> IMPORT Dialog;
>
> TYPE
> P* = POINTER TO R;
> R* = RECORD
> byte*: BYTE;
> p*: P;
> END;
> VAR
> p*: P;
>
> PROCEDURE Update*;
> BEGIN
> p.byte := 6;
> p.p.byte := 11;
> Dialog.Update(p^)
> END Update;
>
> BEGIN
> NEW(p);
> NEW(p.p);
> END Foo.
>
>
>
> skulski{([at]})nowhere.xy>> Doug:
>>
>> It is more than you wrote. Dialog works with statically defined records,
>> while OOP design paradigm works best with dynamically allocated records.
>> The usual OOP paradigm is to define an Abstract Data Structure as a
>> POINTER TO RECORD, and then to instantiate such structures dynamically.
>> One can then make arrays of structures, linked lists of structures,
>> and so forth. Unless I am missing something obviuous, Dialog does not
>> display such dynamical structures. Nor does it display stack objects,
>> that is structures declared locally in a procedure. Dialog only works
>> with "interactors", that is statically declared records at a module
>> global level.
>>
>> In my own DAQ programs I copy the data from my "objects" (i.e.,
>> dynamically
>> created structures) to interactors, and then I call Dialog.Update. In my
>> GUI commands I do the opposite: at the end of every command I copy the
>> relevant data back from the interactor to the object. The premise being
>> that the user has modified the interactor data, and then pressed a
>> button
>> that the command is attached to.
>>
>> I do not see a simple workaround, but I also do not see a pressing need
>> for such a workaround. It takes some getting used to, and it works
>> well. I am not sure I understand why we should not just get used to the
>> fact that this is the way Dialog works.
>>
>> W.
>>
>>
>>
>>>Folks,
>>>The module Dialog exports the following update functions
>>>
>>> PROCEDURE Update (IN interactor: ANYREC);
>>> PROCEDURE UpdateList (IN interactor: ANYREC);
>>> PROCEDURE UpdateBool (VAR b: BOOLEAN);
>>> PROCEDURE UpdateInt (VAR i: INTEGER);
>>> PROCEDURE UpdateLInt (VAR l: LONGINT);
>>> PROCEDURE UpdateReal (VAR r: REAL);
>>>
>>>There are no Updates for
>>>
>>>2. SHORTCHAR the characters of the LatinĀ‘1 character set (0X .. 0FFX)
>>>3. CHAR the characters of the Unicode character set (0X .. 0FFFFX)
>>>4. BYTE the integers between MIN(BYTE) and MAX(BYTE)
>>>5. SHORTINT the integers between MIN(SHORTINT) and MAX(SHORTINT)
>>>8. SHORTREAL the real numbers between MIN(SHORTREAL) and MAX(SHORTREAL),
>>>the value INF
>>>10.SET the sets of integers between 0 and MAX(SET)
>>>
>>>This seems(?) to necessitate 'copying' those data types to a record,
>>>rec, and then calling Update(rec). That is inefficient and violates
>>>the following principle.
>>>
>>>GUI PRINCIPLE
>>>Any module M should be displayable in a form F via a module D without
>>>copying any fields of M into D.
>>>
>>>Can this principle be realized in BlackBox? If not why not?
>>>
>>>If one must copy then F must reference both M and D which seems unclean
>>>(or all displayed exports of M must be copied to D and then only D is
>>>referenced in F).
>>>
>>>It copying can be avoided then F can reference the M data directly and
>>>only the guards and notifiers need reside in D. This would provide a
>>>clean separation of disciplines.
>>>
>>>-Doug Danforth
>>>
>>>--- BlackBox
>>>--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy>>>
>>>
>>
>>
>> --- BlackBox
>> --- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy>>
>>
>>
>
> --- BlackBox
> --- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy>
>
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-277281651_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBccGFyDQpEb3VnOlxwYXINClxw
YXINCm5vdCBzdXJlIEkgYW0gZ2V0dGluZyB5b3VyIHBvaW50LiBJIGNvbXBpbGVkIHRoZSBtb2R1
bGUgYW5kIHJhbiB0aGUgZm9ybVxwYXINCmJ1aWxkZXIgb24gaXQsIGFuZCBJIGdvdCBhIGZvcm0g
d2l0aCB0aGUgYnV0dG9uICJVcGRhdGUiIGJ1dCB0aGUgZGF0YVxwYXINCmZpZWxkcyBhcmUgbm90
IHRoZXJlLiBJIGNhbiBwcmVzcyB0aGUgVXBkYXRlIGJ1dCB3aGVyZSBpcyB0aGUgZGF0YT9ccGFy
DQpccGFyDQpOb3Qgc3VyZSB0aGF0IEkgYWdyZWUgd2l0aCB0aGUgInBvb3IgZGVzaWduIiBzdGF0
ZW1lbnQsIGVpdGhlci4gSW4geW91clxwYXINCm9yaWdpbmFsIHBvc3RpbmcgeW91IHF1b3RlZCBh
ICJHVUkgUFJJTkNJUExFIiwgYnV0IHdobyB3cm90ZSB0aGF0XHBhcg0KcHJpbmNpcGxlIGFuZCB3
aHkgc2hvdWxkIGl0IGJlIGZvbGxvd2VkPyBUaGUgZmlyc3Qg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