Forum Replies Created
- AuthorPosts
- Jim LockerMember
It turns out that if I put the data in c:ProgramDataThePropertyManager
it works as expected. In Windows 7 anyway. Will it work the same way in
Vista and in Windows 8?What a butt-ugly security model.
Jim LockerMemberA bit more information.
I have discovered that, even though browsing with explorer shows my data
files to be in c:PublicPublic DocumentsThePropertyManager, if I start
simpol personal and use the requester in simpol personal to browse to that
subdirectory, simpol personal reports it is opening a file in
c:PublicDocumentsThePropertyManager.If I change the path defined in my program to match this, and run my
program with normal rights, it continues to report that it fails to find
files located at c:PublicPublic DocumentsThePropertyManager.However, if I change the desktop icon for the program to specify that it
is to run with administrative privileges, then (after clicking away the
warning about making changes) the program runs, reporting it is opening
files located in c:PublicDocumentsThePropertyManager.This behavior is simply bizarre and undoubtedly has something to do with
some Windows policy or another.How do I get around this?
Also, I escaped the backslashes this time, so let us see if they show…
Jim LockerMemberI also will note that this site stripped the backslashes from my message.
However, you can see where they belong…and they ARE there in the code.Jim LockerMemberI have a working "request 20" with optional drilldown mode.
I implemented it using a list box and I plan to redo it with a grid.
Won't take long; I just have not done it.Also, it uses my structure for database access and not yours.
If you like, I could send you all the code, AND the requisite backend
functions so you could see how I access the database and what is needed in
order to access it more like how you do it.It took a long time to write, but it is pretty much debugged now. You
would not have to change it much to make it work in your format, however
you would have to change it considerably to make it internally consistent
with your format.Basically, my backend loads arrays with record information and passes
those arrays to the requester rather than having the requester process
record objects directly.Jim LockerMemberIf you search back on this board, you will find that a couple years ago I
addressed that issue on this board. I wound up concluding that
wxautomation did not support a number of things I needed, so I wound up
building a piece of Visual Basic "middleware" that handled what needed to
be done. I posted the code here.Jim LockerMemberIt turns out that the shellexecute() library function successfully invokes
this file. Not sure why !execute doesn't work though.Jim LockerMemberWell, I can't offer an opinion on Windows 95 sockets; all I know about
them is that they are limited in that raw sockets are not available.
Also, in those days, network interfaces were commonly found on ISA busses
which had their own set of limitations and which put an additional burden
on the processor.
..
However in any modern environment the hardware handles all of that; on
this Atom Q7 board, if we turn off the compression and routing and just
bridge from one ethernet port to the other, we can ship something like
30000 packets/sec before the hardware maxes out…with the processor
sitting nearly idle the whole time. And, in case you are not familiar
with them, the Atom is a low-power relatively low speed x86 processor
intended for embedded applications and the Q7 form factor is the same
thing. These are not high-end, blazing speed systems like are found on a
modern workstation. We're putting them in satellite modems in order to
have a fully integrated compression router/modem solution, enabling a
one-box satellite earth station. Well, they still need some other RF
components…
..
Now, I know Jean has an older system (XP, I believe), but even in the XP
days the network interfaces were on PCI busses and should be quite
adequately fast. I also realize we are talking Windows here, with all the
lack of transparency and lack of documentation of internals that implies.
If receive buffer overruns are being experienced on systems as recent as
XP systems with PCI busses, then that suggests to me that something needs
to be revisited. It might be as simple as changing the compiler
optimizations.
..
Also, I reiterate, compression/decompression using 7-zip is not only
feasible, but it greatly speeds up the data transfer and reduces the
chance of overrunning the receive buffer. On Superbase, I achieved
greater than order of magnitude increases in transfer speed across the
internet, even after considering the overhead of doing the
compression/decompression, by doing this.
..
It would be useful for Jean to profile her system (at a minimum, use task
manager to watch processor load) at the time her server is receiving all
this traffic in order to see how much work the processor is doing.Jim LockerMemberThis doesn't sound right to me. Any modern client ought to be quite
adequately fast enough to keep ahead of any stream coming over the
internet.
..
Heck, I have a 32 bit Atom processor handling several thousand incoming
packets a second in an environment where we always wind up being
processor-bound based on the fact that we are compressing/decompressing
and routing all the traffic.
..
Even if there is a problem, why not write a dedicated thread that does
nothing but take stuff out of the incoming queue and stuff it into an
internal (and much larger) queue?Jim LockerMemberrCLAIMS is a record object. That object has attributes, methods, and
properties – but none of those are an index, though a pointer to the index
that was used to locate this record is provided.
..
An index is a separate object, again with its own attributes, methods, and
properties – including a pointer to the record object with which is is
associated.
..
These are distinct objects; an index is not a member of a record object.
..
This is only sensible; the record that the record object refers to is
totally arbitrary in its construction, owing its form (the fields that
compose it) only to its intended function in the database model and not to
its intended function in any simpol (or any other) program.
..
Similarly, the choice of indexes in the database model is totally
arbitrary, owing only to the database model and not to the language.
..
Making an index an attribute of a record object would be a fatal flaw in
the design of simpol.
..
Properly, you need to separate in your mind the model of the system you
are building from the model of the implementation of the system. The one
represents a design to perform a function irrespective of implementation
details, the other represents the implementation of that design in a
particular language.
..
So, from this perspective, the record with its associated fields and
indexes represents an important factor in the design of your system to
perform your function; to a large extent, the organization of your total
database IS the model of the functionality of your system. The record
object that you use in simpol is an object entity within simpol only,
which exists to enable Simpol to manipulate your record according to the
rules of simpol. The index object within simpol is another, totally
separate, entity within simpol to permit you to manipulate your indexes
within your database – and an index is not the same as a record and is not
subordinate to a record.
..
As an analogy, if your model is a statue, you can build the statue out of
wood, or bronze, or plaster of paris. In each case, you are implementing
your model, but the methods you employ in the implementation are
completely different.
..
What you are doing here is confusing the model of the entity with the tool
used to implement the model of the entity. Don't do that.Jim LockerMemberReplace your listboxes with grids.
Jim LockerMemberOh…one other comment about compiler warnings.
..
Sometimes they are just plain wrong.
..
Thus as an example, the following segment of code:
..
array xinfo
xinfo =@ array.new()
..
…and a few lines later, inside an if statement:
..
xinfo =@ blankrecord(app.fg.sg, "xinfo.sbm", "XINFO")
..
reliably generates the warning:
..
Warning: Variable declared and not used in the following line:
I:NewTPMPropMgrcomfcnlibcomfcnlibComfcns.sma(2891): array xinfo
..
I have maybe half a dozen cases like this in my code, which are clearly
wrong, aggravating to see every time, and absolutely not worth worrying
about.Jim LockerMemberYou should put forth the effort to get rid of the warnings. If you don't
you find genuine errors to be obscured; they are reported, but you don't
spot them because they are lost among all the warnings.
..
Also, usually the warnings are telling you that your code is not clean;
code that is not clean can sometimes acquire peculiar errors that are hard
to find and fix.
..
Finally, the IDE only allows so many lines before they scroll into the bit
bucket. You are now encountering this.
..
Duplicate functions means that either you are not being careful with your
own namespace, or you have included a library more than once – or you are
naming your own functions in a fashion that conflicts with a library
function name. You can find the former by doing a "find in files", and
you can identify the second case by checking your list of includes for
your project, and you can identify the latter case by eliminating both of
the first two cases then seeing what is left.
..
The only compiler warning that I am aware of which (to my mind at least)
is a useless warning is the warning about undefined function that comes
when the compiler encounters the syntax of:
..
arrayofobjects[ii].objectmethod()
..
The compiler complains that objectmethod() is an undefined function
because it cannot discern what object will be present in
arrayofobjects[ii]. I have a LOT of these, and I would like to suppress
them because that syntax is valid and it is just so convenient to use, and
I am not going to change my code to shut the compiler up.
..
Every other compiler warning is telling you that, at a minimum, you are
being sloppy. As a practical matter, you will find it to be very
difficult to generate solid and reliable code if you ignore those warnings.Jim LockerMemberYour .fix is wrong.
..
fix(number,denominator) is the syntax, where (per the docs) "The
denominator of the fraction to round to, for example the value 1000 will
cause rounding to three decimal digits. "
..
So your syntax should be sc = .fix(schrg*taxable,100).
..
As written, you are rounding to the nearest half, so 3.5 is actually
correct.Jim LockerMemberThe onlostfocus event will run whenever the control loses focus, no matter
how that happens. In fact, on some controls (particularly dropedit style
listboxes) it also incorrectly runs when the control gets focus or when a
change is made. You can't stop that from happening so to do what it is
you want to do you have to just deal with it.
..
You might want to look at the onmouse event handler. Force that handler
to run before any onlostfocus handler (either use a lock or set up some
appropriate timing delays), and have it set a flag if the mouse was
clicked. Your onlostfocus handler checks that flag, and if it is set,
does not run.
..
It will be up to you how to figure out how to reset that flag
afterward…maybe reset it in ongotfocus handlers.
..
Good luck with that, and if you come up with a reliable way to do it,
please share.Jim LockerMemberIf you remember to do a "save all" after setting your breakpoints, then
they will be set when you restart the IDE after it crashes.
..
When compile time is getting to be too long, then it is time to break your
project up into separate libraries so that you don't have to recompile
every time. You might also consider the possibility of obtaining a faster
system to develop on.
..
Slow compiles on Simpol (although, I must confess, it was on a virtual
machine…and still is) was one of several factors that motivated my last
major hardware upgrade (almost exactly three years ago). Of course, since
I run Linux and only have Windows available in virtual machines, hardware
changes for me are a LOT easier than they are for you native Windows users.My project is presently broken up into 16 libraries. Compiles seldom take
more than 5 or10 seconds. - AuthorPosts