Gentlemen,
I have a VCX library which we have developed that uses collections and I keep getting a compilation error:
Visual Class Library d:\dev\flexipol\flexispec\classes\traffic_light.vcx has the following errors:
Unknown OCOLLECTION_X - Undefined
The collection is mainly used in the "myRefresh" event of the component (base class is a container) and is initialised to null on the property sheet, subsequently getting populated in the actual <<container>>.oCollection_Assign method::
* ControlSource_Assign Method
Lparameters vNewVal
Local oCollection_1 As Collection
Local I
This.oCollection = Evaluate(vNewVal)
This.Control_Source = m.vNewVal
oCollection_1 = This.oCollection
... etc.
The collection thus assigned is manipulated in the myRefresh method and basically parsed through element by element refreshing a discrete control for every instance in the collection.
* myRefresh Method
Local oCollection_x as Collection
local I
local oLight
Local lDoTextMerge
local cOldAlias
cOldAlias = Alias()
oCollection_x = This.oCollection
I=1
For Each oObj In oCollection_x
... etc etc.
All the coding works despite this damned error being thrown at compile time and I have tried all types of External commands thinking that the oCollection not being found could be fixed as you do with external arrays. However there isn't an "External Collection" command... so I am now stuck!
Any ideas?
Dave
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/18725B8CD2D5D247873A2BAF401D4AB290267150@EX2010-A-FPL.FPL.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Dave Crozier wrote on 2016-08-23:
> Gentlemen,
> I have a VCX library which we have developed that uses collections and I
keep getting a compilation error:
>
> Visual Class Library d:\dev\flexipol\flexispec\classes\traffic_light.vcx
has the following errors:
> Unknown OCOLLECTION_X - Undefined
> The collection is mainly used in the "myRefresh" event of the component
(base class is a container) and is initialised to null on the property
sheet, subsequently getting populated in the actual
<<container>>.oCollection_Assign method::
>
> * ControlSource_Assign Method
> Lparameters vNewVal
> Local oCollection_1 As Collection
> Local I
>
> This.oCollection = Evaluate(vNewVal)
> This.Control_Source = m.vNewVal
> oCollection_1 = This.oCollection
> ... etc.
>
> The collection thus assigned is manipulated in the myRefresh method and
basically parsed through element by element refreshing a discrete control
for every instance in the collection.
>
> * myRefresh Method
> Local oCollection_x as Collection
> local I
> local oLight
> Local lDoTextMerge
> local cOldAlias
>
> cOldAlias = Alias()
> oCollection_x = This.oCollection
>
> I=1
> For Each oObj In oCollection_x
> ... etc etc.
>
> All the coding works despite this damned error being thrown at compile
time and I have tried all types of External commands thinking that the
oCollection not being found could be fixed as you do with external arrays.
However there isn't an "External Collection" command... so I am now stuck!
>
> Any ideas?
>
> Dave
Dave,
Backup, then pack the VCX. Sounds like you have a lost/corrupt code bit.
Tracy Pearson
PowerChurch Software
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/002201d1fd4d$f745a220$e5d0e660$@powerchurch.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Tracy,
Tried that... no joy.
My code is a little misleading as I meant to say:
Slight mis-information in the last post in that:
"Unknown OCOLLECTION_X - Undefined The collection is mainly used in the "myRefresh" event of the component
(base class is a container) and is initialised to null on the property sheet, subsequently getting populated in the actual <<container>>.Control_Source_Assign method"
Should be read as " .... <<container>>.oCollection_Assign method".
I use a user defined property Control_Source to bind the collection to the object in a similar way to the native ControlSource property.
This is now baffling me completely.
Dave
-----Original Message-----
From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Tracy Pearson
Sent: 23 August 2016 15:52
To: profox@leafe.com
Subject: RE: Weird Compilation error
Dave Crozier wrote on 2016-08-23:
> Gentlemen,
> I have a VCX library which we have developed that uses collections
> and I
keep getting a compilation error:
>
> Visual Class Library
> d:\dev\flexipol\flexispec\classes\traffic_light.vcx
has the following errors:
> Unknown OCOLLECTION_X - Undefined The collection is mainly used
> in the "myRefresh" event of the component
(base class is a container) and is initialised to null on the property sheet, subsequently getting populated in the actual <<container>>.oCollection_Assign method::
>
> * ControlSource_Assign Method
> Lparameters vNewVal
> Local oCollection_1 As Collection
> Local I
>
> This.oCollection = Evaluate(vNewVal)
> This.Control_Source = m.vNewVal
> oCollection_1 = This.oCollection
> ... etc.
>
> The collection thus assigned is manipulated in the myRefresh method
> and
basically parsed through element by element refreshing a discrete control for every instance in the collection.
>
> * myRefresh Method
> Local oCollection_x as Collection
> local I
> local oLight
> Local lDoTextMerge
> local cOldAlias
>
> cOldAlias = Alias()
> oCollection_x = This.oCollection
>
> I=1
> For Each oObj In oCollection_x
> ... etc etc.
>
> All the coding works despite this damned error being thrown at
> compile
time and I have tried all types of External commands thinking that the oCollection not being found could be fixed as you do with external arrays.
However there isn't an "External Collection" command... so I am now stuck!
>
> Any ideas?
>
> Dave
Dave,
Backup, then pack the VCX. Sounds like you have a lost/corrupt code bit.
Tracy Pearson
PowerChurch Software
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/18725B8CD2D5D247873A2BAF401D4AB2902671BB@EX2010-A-FPL.FPL.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
On Tue, Aug 23, 2016 at 10:45 AM, Dave Crozier <DaveC@flexipol.co.uk> wrote:
>
> All the coding works despite this damned error being thrown at compile time and I have tried all types of External commands thinking that the oCollection not being found could be fixed as you do with external arrays. However there isn't an "External Collection" command... so I am now stuck!
>
I'd use:
EXTERNAL ARRAY oCollection_X
in the myRefresh() code
But it sounds like you've tried that. Each method in a VCX is
essentially compiled separately, so the EXTERNAL command is local to
each snippet.
--
Ted Roche
Ted Roche & Associates, LLC
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACW6n4t9-91teeW1qtGXr5uAT4BSQ7VqAhWiOqc6mZu_CvjCLA@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Ted,
Yes, that was the first thing I tried.... no effect...
I have also tried declaring oCollection_X as a public variable in the mainline stub even though it is never called just to remind the compiler that it does exist... again no joy I am afraid.
Dave
-----Original Message-----
From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Ted Roche
Sent: 23 August 2016 16:13
To: profox@leafe.com
Subject: Re: Weird Compilation error
On Tue, Aug 23, 2016 at 10:45 AM, Dave Crozier <DaveC@flexipol.co.uk> wrote:
>
> All the coding works despite this damned error being thrown at compile time and I have tried all types of External commands thinking that the oCollection not being found could be fixed as you do with external arrays. However there isn't an "External Collection" command... so I am now stuck!
>
I'd use:
EXTERNAL ARRAY oCollection_X
in the myRefresh() code
But it sounds like you've tried that. Each method in a VCX is essentially compiled separately, so the EXTERNAL command is local to each snippet.
--
Ted Roche
Ted Roche & Associates, LLC
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/18725B8CD2D5D247873A2BAF401D4AB290267263@EX2010-A-FPL.FPL.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.