RE: Compiler error "parameter does not match" (a bug?)

From: [at]} <Wojtek>
Date: Mon, 14 Jul 2003 14:44:56 -0400 (EDT)

----boundary-LibPST-iamunique-1365068920_-_-
Content-type: text/plain

On Mon, 14 Jul 2003, Campbell, Robert D (UK) wrote:

> [Wojtek reports a problem, described as follows:]
> > My problem was that I need the RECORD, not pointer to record,
> > because Controls do not take pointers.

>
> [Robert answers:]
> I thought that they did. I am talking, quickly, about
> stuff I did a long time ago, so my memory is rusty. But...
>
> The Controls Link is established when it is loaded, so the
> pointer and its pointed to data must be already initialised.
> The link stays static, so if you change the pointer the Control
> still points to the old data. If you unload the Module, all kinds
> of grief!.
>
> To follow the changed pointer use Controls.Relink.

I checked the Controls docu and your recollection does not
match. The Controls are linked to exported global variables.
This is done indirectly by passing the fully qualified name
of the variable as a string, such as "TextCmds.find.replace",
which the example string from the docu. It is not a pointer,
it is a name of the variable in "" marks. From there the module
Meta will find the variable and link it to a given control.

So, what you can or cannot do depends on the module Meta,
whose documentation is so confusing to me that I gave up
on this entire subject of trying to exploit the Dialog/Control
interactions. In particular, I was not able to understand
whether or not the name in "" can denote a pointer rather
than a record, and whether or not the pointer will be dereferenced
by Meta and then linked to the Control.

When I step back and look at the Dialog/Control pair from
a distance of a few yards, then I see it makes certain things
extremely easy to achieve. This is why I want to use this mechanism
in the first place, to quickly achieve the solution to my problem.
Then I look closer and I can see, that the details are bloody
and not well documented, at least in terms of Meta, whose docu
is pitiful in my opinion. (This is just my opinion. I cannot
understand documentation of Meta. Perhaps someone else can.)
Perhaps some more wizardry can be done with Meta, but I cannot
see how, without heavy hacking. My goal is not to hack, but
rather to get my development done quickly and move on to other
things.

I have written an application which follows the Dialog/Control
paradigm very closely, by using globally defined records, which
means these are singletons. This happens to solve my immediate
problem, so I am done with it. I thought I e-mailed you the 1st
draft of that application.

Gerard has implemented the free-floating views with tree controls.
His module is now in the CPC Util collection. He used a hack.
Each time he needs to redraw the tree control, which is anchored
in a view and thus not directly accessible to Meta, he copies
the entire record to one globally declared variable and then he
calls Controls to plot this record on screen. (Procedure Fix.)
This works, but it is a hack. I was deeply impressed by Gerard's
resoucefulness in hacking away the limitation posed by Dialog/Control
design.

On the other hand, I think we should remember this was a hack,
and not something that Dialog/Control was supposed to do.
The limitations come from Meta. I think that the Control
interface can be augmented to allow passing a pointer to it,
rather than a string. In such a way the hacking may become
unnecessary. The way it is now, I do not think one could solve
the problem without heavy hacking, what Gerard just did.

Cheers,

Wojtek







--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-1365068920_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIE9uIE1vbiwgMTQgSnVsIDIwMDMsIENhbXBiZWxs
LCBSb2JlcnQgRCAoVUspIHdyb3RlOlxwYXINClxwYXINCj4gW1dvanRlayBy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zb21lIGRlbGF5LCBpbiBwYXJ0aWN1bGFyIG92ZXIg
d2Vla2VuZHMgb3IgaG9seWRheX19AHJvbHMgYQ==


----boundary-LibPST-iamunique-1365068920_-_---
Received on Mon Jul 14 2003 - 20:44:56 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:08 UTC