Re: [BLACKBOX] Sorting a Dialog.List

From: [at]} <>
Date: Fri, 14 Sep 2012 13:42:29 +0800

nu.&I8y׽}
z{mʗ{V
z{S}ĝxjǺhi Stephen,


I think you'd better post a simple module which contains your problem to the list,
then others may quick focus on your question and give you a solution which test ok.


Regards,

luowy

luowy{([at]})nowhere.xy
 
----- ?? -----
???: Stephen R. Troy
? ?: Re: [BLACKBOX] Sorting a Dialog.List
? ?: 2012?9?14? 1:58:17

Werner and Robert, thanks for your suggestions. I did ask a newbie question, about the inner workings of a Black Box distribution module. I've only been using Black Box on and off for going on two years now, and am still getting used to its peculiarities and trying to understand its version of object-oriented programming. Overall, I started programming digital computers in 1957, so in that sense I'm no newbie -- I'm an engineer, and develop programs to carry out engineering and operations research tasks -- I don't develop software as stand-alone products. I've used FORTRAN and BASIC, various assemblers and several flavors of machine language, mainframes, minis and desktop machines -- experienced the joys of punched paper tape and punched cards -- switched to Pascal in the mid-80s, and then Modula-2.
I'm retired now, and this program I'm working on is a hobby project. I had coded it in XDS Modula-2, but for various reasons I'm now migrating it to Black Box. I'm not worried about having 33,000 choices in a list box, because as long as they're sorted, it's easy to scroll to find the one wanted -- did this in XDS and it worked fine.

Even a bubble sort would be much faster if it could be run inside the Dialog module. Although it would still be On^2, almost all of those times it would not be necessary to read out two complete strings in order to do a comparison -- the first one or two characters would be enough -- whereas from outside the Dialog module, Dialog.GetItem has to read out the entire string every time. But this could only be done either inside the Dialog module or by exporting the List record from the Dialog module, either of which requires modifying a Black Box distribution module, which as a Black Box newbie I'm still nervous about. That was why I was asking about possible alternatives. Other times people on this list have kindly pointed out solutions that I had not seen because they were in a part of Black Box where I had not thought to look.
Again, thanks to all for your suggestions.
Steve Troy in Maryland USA
nu.&I8y׽}
z{mʗbqb
z{m}ޝxjǺ
z{Ch+bv!~)^{\rtf1\ansi\ansicpg1252\fromtext \fbidis \deff0{\fonttbl
{\f0\fswiss Arial;}
{\f1\fmodern Courier New;}
{\f2\fnil\fcharset2 Symbol;}
{\f3\fmodern\fcharset0 Courier New;}}
{\colortbl\red0\green0\blue0;\red0\green0\blue255;}
\uc1\pard\plain\deftab360 \f0\fs20 hi Stephen,\par
\par
\par
I think you'd better post a simple module which contains your problem to the list,\par
then others may quick focus on your question and give you a solution which test ok.\par
\par
\par
Regards,\par
\par
luowy\par
\par
luowy{([at]})nowhere.xy
 \par
----- ?? ----- \par
???: Stephen R. Troy \par
? ?: Re: [BLACKBOX] Sorting a Dialog.List\par
? ?: 2012?9?14? 1:58:17\par
\par
Werner and Robert, thanks for your suggestions. I did ask a newbie question, about the inner workings of a Black Box distribution module. I've only been using Black Box on and off for going on two years now, and am still getting used to its peculiarities and trying to understand its version of object-oriented programming. Overall, I started programming digital computers in 1957, so in that sense I'm no newbie -- I'm an engineer, and develop programs to carry out engineering and operations research tasks -- I don't develop software as stand-alone products. I've used FORTRAN and BASIC, various assemblers and several flavors of machine language, mainframes, minis and desktop machines -- experienced the joys of punched paper tape and punched cards -- switched to Pascal in the mid-80s, and then Modula-2. \par
I'm retired now, and this program I'm working on is a hobby project. I had coded it in XDS Modula-2, but for various reasons I'm now migrating it to Black Box. I'm not worried about having 33,000 choices in a list box, because as long as they're sorted, it's easy to scroll to find the one wanted -- did this in XDS and it worked fine.\par
\par
Even a bubble sort would be much faster if it could be run inside the Dialog module. Although it would still be On^2, almost all of those times it would not be necessary to read out two complete strings in order to do a comparison -- the first one or two characters would be enough -- whereas from outside the Dialog module, Dialog.GetItem has to read out the entire string every time. But this could only be done either inside the Dialog module or by exporting the List record from the Dialog module, either of which requires modifying a Black Box distribution module, which as a Black Box newbie I'm still nervous about. That was why I was asking about possible alternatives. Other times people on this list have kindly pointed out solutions that I had not seen because they were in a part of Black Box where I had not thought to look.\par
Again, thanks to all for your suggestions.\par
Steve Troy in Maryland USA}}nu.&I8y׽}
Received on Fri Sep 14 2012 - 07:42:29 UTC

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