| Author |
Message |
drama Senior Member

Joined: 11 Jan 2005 Posts: 214
|
Posted: Mon Apr 11, 2005 2:49 pm Post subject: Adding post commands to pre commands |
|
|
Hi all, I noticed when i remove a pre or post command the ‘goto line’ statements automatically change to the correct line number. But when i copy a post command (with a ‘goto line' statement) to the pre commands, the line number won’t change automatically. In this example i added the post commands to line 53, and as you can see line 54 is incorrect. I think everyone checks those things by itself, but just to be consistent i thought it might be an interesting ad-on. grtz  |
|
| Back to top |
|
 |
toaddub Moderator

Joined: 12 Sep 2004 Posts: 1986
|
Posted: Mon Apr 11, 2005 3:14 pm Post subject: |
|
|
| I see what you're saying. Iff (if and only if) the goto command in the multiple copied selection references a command in the selection, the goto command will adjust accordingly at the destination. This will be a minor enhancement in that it works either ways. It's similar to the Auto Bypass functionality (copy post-commands to pre-commands) when hiding. |
|
| Back to top |
|
 |
drama Senior Member

Joined: 11 Jan 2005 Posts: 214
|
Posted: Mon Apr 11, 2005 3:31 pm Post subject: |
|
|
| So the 'auto bypass' function does actually the same thing? I didn’t know what it’s function was for sure. But in most cases (in my experience) blanked out cells will play even using the auto bypass function. So i try to prevent this by adding the post commands to the pre commands. |
|
| Back to top |
|
 |
rubicat Moderator

Joined: 30 Sep 2004 Posts: 816
|
Posted: Mon Apr 11, 2005 3:43 pm Post subject: |
|
|
| I'm not sure I follow you toaddub. If you do a "Add post to pre commands" or the Auto-bypass feature does it for you, it does update the goto statements (adds the total number of pre-commands prior to the operation, to them). It also changes all of the "Break" statements in the pre-commands to "goto line x" where x is the first line of the added commands. I think that if you copy multiple commands that include a goto statement, the goto line numbers should be changed when you paste them, just as it does with "Add post to pre commands." Maybe this is what you were saying toaddub. Nice catch drama. |
|
| Back to top |
|
 |
DimadSoft DvdReMake Official support

Joined: 19 Mar 2004 Posts: 2193
|
Posted: Mon Apr 11, 2005 4:03 pm Post subject: |
|
|
"Add post to pre commands" does all the needed changes (like rubicat described). The reason why "copy"/"add copied" does not change line numbers is very simple: it is not always possible to fugure out what changes should be done. Adding amount of lines already available in the commands group to all "pasted" gotos statements seems fine for your example. But, lets suppose that you've copied only lines 2-5 (or even "wilder" lines 2, 4 and 5). Ops. Adding amount of lines in pgc does not work now It would not be possible to modify gotos correctly without keeping track of where commands were copied from. |
|
| Back to top |
|
 |
rubicat Moderator

Joined: 30 Sep 2004 Posts: 816
|
Posted: Mon Apr 11, 2005 4:14 pm Post subject: |
|
|
| Ah yes, I hadn't thought of that. |
|
| Back to top |
|
 |
drama Senior Member

Joined: 11 Jan 2005 Posts: 214
|
Posted: Mon Apr 11, 2005 4:24 pm Post subject: |
|
|
| rubicat wrote: | | Ah yes, I hadn't thought of that. | Same goes for me  |
|
| Back to top |
|
 |
rubicat Moderator

Joined: 30 Sep 2004 Posts: 816
|
Posted: Mon Apr 11, 2005 4:31 pm Post subject: |
|
|
| If the user attempts to paste commands that include goto's, perhaps a warning could be added, that would pop up to say that the goto's might be bogus in their new location. |
|
| Back to top |
|
 |
DimadSoft DvdReMake Official support

Joined: 19 Mar 2004 Posts: 2193
|
Posted: Mon Apr 11, 2005 4:42 pm Post subject: |
|
|
Well, pretty much any pasted command can be considered bogus So rather then poping up a message all the time it better to consider paste operation not safe in a first place (without additional (annoing?) warnings)  |
|
| Back to top |
|
 |
toaddub Moderator

Joined: 12 Sep 2004 Posts: 1986
|
Posted: Mon Apr 11, 2005 4:44 pm Post subject: |
|
|
| DimadSoft wrote: | But, lets suppose that you've copied only lines 2-5 (or even "wilder" lines 2, 4 and 5). Ops. Adding amount of lines in pgc does not work now  | This can be done though, just more work. So if lines 2-5 are copied, the new goto command will reference line 56 in precommand because in the copied selection, line 2 "knows" that it references line 5. So if only lines 2,4,5 are copied, again, line 2 "knows" that it references line 5 in the copied selection. Then in the precommand section, the new goto command will reference line 55. If there are any "Break" command in the first place, as rubicat says, "It also changes all of the "Break" statements in the pre-commands to "goto line x" where x is the first line of the added commands." If the copied goto command is by itself or there's no reference in the copied selection, then it would not be possible to "guess" the destination, so the user will have to manually change it. |
|
| Back to top |
|
 |
rubicat Moderator

Joined: 30 Sep 2004 Posts: 816
|
Posted: Mon Apr 11, 2005 4:57 pm Post subject: |
|
|
| DimadSoft wrote: | Well, pretty much any pasted command can be considered bogus So rather then poping up a message all the time it better to consider paste operation not safe in a first place (without additional (annoing?) warnings)  | True. I guess you can only go so far in trying to make the program noob-proof. |
|
| Back to top |
|
 |
DimadSoft DvdReMake Official support

Joined: 19 Mar 2004 Posts: 2193
|
Posted: Mon Apr 11, 2005 7:50 pm Post subject: |
|
|
| toaddub wrote: | | DimadSoft wrote: | But, lets suppose that you've copied only lines 2-5 (or even "wilder" lines 2, 4 and 5). Ops. Adding amount of lines in pgc does not work now  | This can be done though, just more work. So if lines 2-5 are copied, the new goto command will reference line 56 in precommand because in the copied selection, line 2 "knows" that it references line 5. | Yes, just like was said | Quote: | | It would not be possible to modify gotos correctly without keeping track of where commands were copied from. | With some messing around it is possible. But still only assuming that user will use the copy/append feature in a particular way. Who knows may be all he/she wants to have is direct copy Having confirmation dialogs asking what should be done to copied commands is possible but probably not too practical. |
|
| Back to top |
|
 |
toaddub Moderator

Joined: 12 Sep 2004 Posts: 1986
|
Posted: Mon Apr 11, 2005 8:18 pm Post subject: |
|
|
| Yeah, no need for confirmation dialogs. But maybe having an option in the Options menu to whether the user wants the goto statement to change automatically or not for the "Add Copied" and "Insert Copied". The "Add post to pre commands" works if you want to copy everything in the post-commands to the pre-commands, and it works fine as it is. But sometimes the user wants to copy just a portion of commands, that include the goto statement and its referenced statement, then it would be nice for that goto statement to change (goto line x) accordingly when using "Add Copied" or "Insert Copied". I hope you understand what I'm trying to convey. |
|
| Back to top |
|
 |
CDR-Zone.COM Advertisement Bot
 
|
Posted: Post subject: Advertisement: |
|
|
|
|
|
| Back to top |
|
 |
|