Advanced tag completion concept
Posted: Wed Mar 16, 2005 11:24 pm
Hows this for an idea...
A delimiter specific function:
that monitors the progress of a tags completion.
ex: as you key in the tag name , the application is monitoring for certain character strokes like an '=' sign that you will obviously not have in a closing delimiter, hence the application will mark or close the closing delimiter appropriately with the '>' sign.
The actual process that will be watching the the opening delimiter as it is being created, will only have to cross reference a set library of character strokes, it should be a relatively simple job, as two processes could be run and one of them will be a conditional "if" statement, which you could accomplish with plain old "basic" programming syntax.
An equal to, or '=', precedes attributes, and we all know attributes and proporties, among a few other delimiter identification specific entities, will not be allowed in closing delimiters, so this is the hotspot.
A closing delimiter is severely more critical than an opening delimiter, because if the closing delimiter is not identically named to an openening delimiter, that delimiter is incorrect and so is the rest of the corresponding element, and document as well. This is the area which needs the greatest amount of attention, because it is the most obvious area and therefore, the most easily overlooked area.
Now as you change certain aspects of an opening delimiter, and/or a closing delimiter, a process should be able to identify as to whether or no a "tag" is an opener or closer delimiter and adjust accordingly...
- Looking for and finding a forward slash character in a tag obviously says that the delimiter in question is a closing tag, so any adjustments made to the delimiter name can be applied to the opening delimiter immediately, as the changes are being made to the closing delimiter.
- Now monitoring an opening delimiter will be a little more complicated than a closing delimiter, as the process in charge of monitoring changes, will have to be able to identify where the changes are being made in an opening delimiter...
The process will have to toggle, so to speak, let's say around my favorite key stroke, the equal to sign (=), determining quickly if the changes in progress are being made on the right or left side of the '='.
If the changes are to the right side of the '=', then no changes are made to the closing delimiter, because there are no attributes or properties and the like allowed in the closing delimiter in the first place.
The work comes in when changes are being made to the left of the'=' in an opening delimiter, because it is then that it is not so cut and dry...
The process monitoring for changes, recognizing that changes are being made to the opening delimiter all before the '=' will now have to look for colons (:) and the like to once again asses as to whether or not that changes are actually being implemented to the actual delimiter name of the opening tag.
Somewhere in this confusing mess I just typed lies the answer, I think, for a relatively intelligent and responsive automated delimiter completion system.
Good hunting and God's speed...
ROBB
A delimiter specific function:
that monitors the progress of a tags completion.
ex: as you key in the tag name , the application is monitoring for certain character strokes like an '=' sign that you will obviously not have in a closing delimiter, hence the application will mark or close the closing delimiter appropriately with the '>' sign.
The actual process that will be watching the the opening delimiter as it is being created, will only have to cross reference a set library of character strokes, it should be a relatively simple job, as two processes could be run and one of them will be a conditional "if" statement, which you could accomplish with plain old "basic" programming syntax.
An equal to, or '=', precedes attributes, and we all know attributes and proporties, among a few other delimiter identification specific entities, will not be allowed in closing delimiters, so this is the hotspot.
A closing delimiter is severely more critical than an opening delimiter, because if the closing delimiter is not identically named to an openening delimiter, that delimiter is incorrect and so is the rest of the corresponding element, and document as well. This is the area which needs the greatest amount of attention, because it is the most obvious area and therefore, the most easily overlooked area.
Now as you change certain aspects of an opening delimiter, and/or a closing delimiter, a process should be able to identify as to whether or no a "tag" is an opener or closer delimiter and adjust accordingly...
- Looking for and finding a forward slash character in a tag obviously says that the delimiter in question is a closing tag, so any adjustments made to the delimiter name can be applied to the opening delimiter immediately, as the changes are being made to the closing delimiter.
- Now monitoring an opening delimiter will be a little more complicated than a closing delimiter, as the process in charge of monitoring changes, will have to be able to identify where the changes are being made in an opening delimiter...
The process will have to toggle, so to speak, let's say around my favorite key stroke, the equal to sign (=), determining quickly if the changes in progress are being made on the right or left side of the '='.
If the changes are to the right side of the '=', then no changes are made to the closing delimiter, because there are no attributes or properties and the like allowed in the closing delimiter in the first place.
The work comes in when changes are being made to the left of the'=' in an opening delimiter, because it is then that it is not so cut and dry...
The process monitoring for changes, recognizing that changes are being made to the opening delimiter all before the '=' will now have to look for colons (:) and the like to once again asses as to whether or not that changes are actually being implemented to the actual delimiter name of the opening tag.
Somewhere in this confusing mess I just typed lies the answer, I think, for a relatively intelligent and responsive automated delimiter completion system.
Good hunting and God's speed...
ROBB