SPCanvasItem

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

SPCanvasItem

Ralf Stephan
Hello,
I can find no way to make a canvas item a singleton, i.e., ensure that
only one of its class is created. Is there a way?


Thanks,
ralf



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: SPCanvasItem

MenTaLguY
On Sun, 2005-07-03 at 17:20 +0200, Ralf Stephan wrote:
> Hello,
> I can find no way to make a canvas item a singleton, i.e., ensure that
> only one of its class is created. Is there a way?

Can you please elaborate on what you are trying to do?

I can't imagine any circumstances under which a singleton canvasitem
class would be useful...

(you might want to have e.g only one per canvas, but globally across all
canvases?)

-mental

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: SPCanvasItem

Ralf Stephan
> > I can find no way to make a canvas item a singleton, i.e., ensure that
> > only one of its class is created. Is there a way?
>
> Can you please elaborate on what you are trying to do?
>
> I can't imagine any circumstances under which a singleton canvasitem
> class would be useful...

I am not sure if a singleton SPCGrid would be how to resolve bug 1206554.
I also am now pessimistic about writing a general singleton pattern at all
for a SPCanvasItem subclass, for practical reasons.
However, it seems impossible to control the number of SPCGrids from
the named view, because it doesn't know about previous existing grids.
So I can only offer the referred patch which is an ugly hack, which I
ask to commit.

There is no problem with snapping, as that gets done with the grid owned
by the named view and that is always the newest grid. But the old SPCGrid
still exists and can't be destroyed either (I tried), so it is still visible.

One of the high-visibility bugs that I don't want to have in 0.42.


ralf



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: SPCanvasItem

Ralf Stephan
> I am not sure if a singleton SPCGrid would be how to resolve bug 1206554.

Make that 1206544.


ralf



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: SPCanvasItem

MenTaLguY
In reply to this post by Ralf Stephan
On Mon, 2005-07-04 at 11:14 +0200, Ralf Stephan wrote:
> However, it seems impossible to control the number of SPCGrids from
> the named view, because it doesn't know about previous existing grids.

Huh?  SPNamedView::gridviews is a linked list of all the SPCGrids...

What else do you need?

-mental

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bugs/patches Re: SPCanvasItem

Ralf Stephan
In reply to this post by Ralf Stephan
mental [et al],

After you found out that also bug 1206544 points to the old memory
problem (I agree), you mention I should have uploaded my patch
directly into the bug entry. But how do I do that? Cut'n'paste into
the editor window in firefox mangles lines, and the bug tracker
doesn't let me upload. I also tried lynx once to edit the editor
file in a real editor, with the same mangled result.

Am I missing something here?

Also: I don't need cvs permissions, downloading tarballs and uploading
patches is fine for my purposes, and my patch quality is not stable
as it seems, so okay. But what would be nice is to have the ability
to assign bug(s) to myself as non-dev. Possible?


ralf



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: bugs/patches Re: SPCanvasItem

bulia byak
On 7/5/05, Ralf Stephan <[hidden email]> wrote:
> After you found out that also bug 1206544 points to the old memory
> problem (I agree), you mention I should have uploaded my patch
> directly into the bug entry. But how do I do that? Cut'n'paste into
> the editor window in firefox mangles lines, and the bug tracker
> doesn't let me upload. I also tried lynx once to edit the editor
> file in a real editor, with the same mangled result.

You can put it on the web somewhere and put the link in a comment.

> Also: I don't need cvs permissions, downloading tarballs and uploading
> patches is fine for my purposes, and my patch quality is not stable
> as it seems, so okay. But what would be nice is to have the ability
> to assign bug(s) to myself as non-dev. Possible?

Sure, I'll do it if you give me your SF user id.

--
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel