Search Comments and Ratings

go

   
Date File Comment by Comment Rating
29 Mar 2012 Myblob Exchange blobs (binary large objects) with MySQL databases Author: Joerg Buchholz

Joerg Buchholz (view profile)

Joseph Burgel

Nice. I was wondering if anybody has tried to write to a BLOB not from a file but directly from a Matlab matrix variable? Say, a 5x5 double matrix? Skip writing to a .mat and reading back out of the file to save time?

Comment only
19 Oct 2011 CreateGuid MEX MEX to create a Globally Unique Identifier GUID Author: Stephen Lienhard Joseph Burgel

Had some issues compiling this in Windows 7 an ML 2010a. After a little digging, I found:
x = java.util.UUID.randomUUID()
which worked fine for my purpose. Thanks.

Comment only
07 Oct 2011 MATLAB xUnit Test Framework MATLAB xUnit is a unit test framework for MATLAB code. Author: Steve Eddins

Steve Eddins (view profile)

Joseph Burgel

Nice Tool. One question an maybe my philosophy is just wrong (new to TDD) but is there any way to have the code break on error if the code in a given test errors? (i.e. dbstop if error) Thanks,

Comment only
13 Jul 2011 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

Ben,

Regarding July 1 post, I created a public property called "Locked" and wrapped the tab callback in TabPanel:

function iTabClicked( src, evt, obj, idx ) %#ok<INUSL>

if ~obj.Locked
% Call the user callback before selecting the tab
evt = struct( ...
'Source', obj, ...
'PreviousChild', obj.SelectedChild, ...
'SelectedChild', idx );
uiextras.callCallback( obj.Callback, obj, evt );
obj.SelectedChild = idx;
end

end % iTabClicked

Setting Locked to true will allow the user to do things on the active tab but will not allow the tab to change. I tried to subclass TabPanel and overload 'onChildAdded' and 'iTabClicked' to do this but couldn't get this to work because of these private properties:

properties( SetAccess = private, GetAccess = private, Hidden = true )
Images_ = struct()
TabImage_ = []
PageLabels = []
end % private propertie

Next rev, can you add the Locked feature or set these properties to 'protected'

Great package. Thanks.

Comment only
01 Jul 2011 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

Hi Ben,

I've got a tab panel where I'd like to implement a 'edit' mode on one of the tabs. The user should NOT be able to change the active tab until she comes out of 'edit' mode. So, during 'edit mode' the tab control should be disabled. The problem is, Enable property on the tab disables the tab kids as well so the user cannot do anything to child controls of the tab while in 'edit' mode. I'm not allowed to subsequently change Enable on kids either. I see in your code where to change this. Should I just subclass the TabPanel and implement what I describe. Your comments? Suggestions?

Comment only
22 Jun 2011 Straightforward COPY and PASTE functions Allows very simple manual exchange with other applications through the clipboard. Author: Yvan Lengwiler

Yvan Lengwiler (view profile)

Joseph Burgel

Hi Yvan. Nice ftns. One thing I changed was to add special conditions for when a cell array has an 'empty' element. Rather that copying '[]', I test for empty and then simply add the tabs/CR. This way, Excel doesn't print anything for empties. Not sure if this will screw anything else up... In copy.m, line 51:

% *** cell argument **************************************************
elseif isa(x,'cell')
[nrow, ncol] = size(x);
str = '';
for r = 1:nrow
for c = 1:ncol-1
if isempty(x{r,c}),
str = [str char(9)];
else
str = onecell(str, x{r,c}, char(9)); % treat cell, append a tab
end
end
if isempty(x{r,end}),
str = [str char(10)];
else
str = onecell(str, x{r,end}, char(10));% treat cell, append a linefeed
end
clipboard('copy',str); % copy to clipboard
end
Thanks,

5
16 Mar 2011 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

Here's some code that show's a (at least one) problem:

classdef TestIt < hgsetget
properties
ShiftPanel
end

methods

function Test1(Obj)

f = figure( 'Position', 200*ones(1,4) );
vbox = uiextras.VBox( 'Parent', f );
axes( 'Parent', vbox );
hbox = uiextras.HButtonBox( 'Parent', vbox, 'Padding', 5 );
uicontrol( 'Parent', hbox, ...
'String', 'Button 1' );
uicontrol( 'Parent', hbox, ...
'String', 'Button 2' );

end

function Test2(Obj)

f = figure( 'Position', 200*ones(1,4) );
vbox = uiextras.VBox( 'Parent', f );
axes( 'Parent', vbox );
Obj.ShiftPanel = uiextras.HButtonBox( 'Parent', vbox, 'Padding', 5 );
uicontrol( 'Parent', Obj.ShiftPanel, ...
'String', 'Button 1' );
uicontrol( 'Parent', Obj.ShiftPanel, ...
'String', 'Button 2' );
end



end

end

Test1 works but Test2 doesn't. Why can I not instantiate a member property but I can instantiate to a local variable??

Comment only
16 Mar 2011 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

Further investigation reveals the tab container is not rendering correctly because one of the child uiextra containers contains a uicontrol object. remove the uicontrol and the problem disappears....

Comment only
16 Mar 2011 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

Just to echo the parenting concerns. I'm not having a lot of luck moving containers from one parent to another. Using double() isn't helping. uiextras parents or classic Matlab parents do not seem to matter. Sometimes I get indexing errors from within the uiextra code where the number of kids are not correct. Now, I'm getting problems with a Tab view not rendering out correctly because child containers were re-parented.

Comment only
16 Mar 2011 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

What do you all do if you need to remove a container from a parent temporarily? Say, due to state, I only want 2 kids not three. Where do I put third kid. My solution was to give the figure a invisible "Null" container and parent the orphaned container to null when I don't need it. When I tried to use Uiextras.panel as "Null" I got several errors in the uiextras code. When I made the null container's type uipanel, it worked. Not sure why uiextras.panel didn't work? Good method or keeping orphaned containers?

Comment only
14 Dec 2010 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

I'm getting the same bug Holger mentions above:

Try moving the vertical gridflex divider in your example "gridflexpositioning". Only the horizontal dividers are functional.

Comment only
10 Dec 2010 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

Good Idea. Thanks Dave.

Comment only
09 Dec 2010 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

I'm looking at issues where, for instance, I want to maintain the aspect ratio of flex box kids. So, I'd like to know when a flex box resizes - ideally just before and just after a resize. Then, based on this, I might change the sizes property of sub containers, resize panels etc. I don't see callbacks for these events or preset postset, setobservable property attributes set to allow this on the ideal properties. Things like flex resize, I'm currently using child uipanel resize handlers to do this but this seems sloppy. Anybody have a 'best practice' approach to handling resize events in the toolbox?

Comment only
11 Aug 2010 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

Just answered my own question, I'm handlng the 'callback' property of the tab control.That works just find.

Never mind...

Comment only
11 Aug 2010 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

I need to handle the condition when a new tab is selected in the tab container. This would mean I'd like to handle the SelectedChild property change event. When I run findprop, I see that SetObservable is 0 for SelectedChild. Any suggestions? Any reason why this can't be 1? Thanks.

mp = findprop(Dat.Container.h_RightTabPanel,'SelectedChild')

mp =

meta.property handle
Package: meta

Properties:
Name: 'SelectedChild'
Description: ''
DetailedDescription: ''
GetAccess: 'public'
SetAccess: 'public'
Dependent: 1
Constant: 0
Abstract: 0
Transient: 0
Hidden: 0
GetObservable: 0
SetObservable: 0
AbortSet: 0
GetMethod: [function_handle]
SetMethod: [function_handle]
HasDefault: 0
DefiningClass: [1x1 meta.class]

Comment only
09 Aug 2010 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

One thing I'm dealing with now is the need to superimpose two axes over the top of each other. This, to get two Y axes on the same plot. My best guess is to put the two axes in a single uipanel and then add the panel to a parent container. Sound like a the best approach?

Comment only
20 Jul 2010 UISplitPane - Split a container (figure/frame/uipanel) into two resizable sub-containers Split a container (figure/frame/uipanel) into two resizable sub-containers, like Java's JSplitPane Author: Yair Altman

Yair Altman (view profile)

Joseph Burgel

Very cool Yair. Once again, job well done. You should be getting a check from MW.

5
16 Jul 2010 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

Ben Tordoff (view profile)

Joseph Burgel

Thanks for the post. The examples won't run. I'm using ML 7.5 2007b. 2007b doesn't support 'packages'. So, I guess this toolbox won't work for me right? Bummer, it would have been a big help. Thanks.

Comment only
26 May 2010 Get screen size (dynamic) Same as get( 0, 'ScreenSize' ), but dynamic Author: Bill York

Bill York (view profile)

Joseph Burgel

Thank you very much. What a PIA without this.

5
26 May 2010 Figure Window Always on Top Avoid obscuring figure windows by ensuring they always remain on top. Author: John Anderson Joseph Burgel

Tried the example given above in:
MATLAB Version 7.5.0.342 (R2007b) windows XP and got:
figure(1);
winontop('figure 1');
??? Error using ==> winontop
First input argument must be a figure handle

1

Contact us