Click here to Skip to main content
15,915,086 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Desprate need help with buttons and panels Pin
The ANZAC4-Jun-07 12:19
The ANZAC4-Jun-07 12:19 
AnswerRe: Desprate need help with buttons and panels Pin
Christian Graus4-Jun-07 14:45
protectorChristian Graus4-Jun-07 14:45 
QuestionThe method or operation is not implemented. Pin
Blizzardice4-Jun-07 6:27
Blizzardice4-Jun-07 6:27 
AnswerRe: The method or operation is not implemented. Pin
Dave Kreskowiak4-Jun-07 8:16
mveDave Kreskowiak4-Jun-07 8:16 
GeneralRe: The method or operation is not implemented. Pin
Blizzardice4-Jun-07 9:21
Blizzardice4-Jun-07 9:21 
GeneralRe: The method or operation is not implemented. Pin
Dave Kreskowiak4-Jun-07 9:51
mveDave Kreskowiak4-Jun-07 9:51 
QuestionRe: The method or operation is not implemented. Pin
Blizzardice4-Jun-07 11:01
Blizzardice4-Jun-07 11:01 
AnswerRe: The method or operation is not implemented. Pin
Dave Kreskowiak4-Jun-07 13:49
mveDave Kreskowiak4-Jun-07 13:49 
Blizzardice wrote:
Do I have to put something in the get set properties? I implemented another item and put return new item for the get that called that item. But the rest I left blank.


Most likely, yes. Those properties, if mandated by the Interface, are expecting you to store some information, whatever it is. The Interface is saying that the host app is going to expect to find certain kinds of data in those properties.


Blizzardice wrote:
What is the [functionName] purpose of the square brackets?


It's telling the compiler your using a reserved word as a variable name, which would otherwise be illegal.


Blizzardice wrote:
Is there a scoring system here where I give you points for answering my posts?


Just the 1,2,3,4,5 in the bottom right corner of each post.


Blizzardice wrote:
Public Property Progressor() As ESRI.ArcGIS.esriSystem.IProgressor Implements ESRI.ArcGIS.esriSystem.ITrackCancel.Progressor
Get
Return New MyProgressor
End Get
Set(ByVal value As ESRI.ArcGIS.esriSystem.IProgressor)

End Set
End Property


I don't know what you asking here. From this little piece of code, it looks like this property is returning a new instance of an object that implements IProgressor, on every call to the property. This can get out of control very rapidly. EVERY SINGLE call to this property would create a new instance, NOT returning the same instance that was help before. If you've not a pro at this, using a technique like this can lead to some nasty problems to debug.

Normally, you wouldn't use a property to do this. Normally, you use a shared factory method in a class to create new instances. This is an example of a over simplified factory method:
Public Shared Function CreateProgressor() As IProgressor
    Return New MyProgressor
End Function

What you posted looks like a poor-mans implementation of the Factory pattern.


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


QuestionHierarchical data Pin
advansis4-Jun-07 6:25
advansis4-Jun-07 6:25 
AnswerRe: Hierarchical data Pin
Dave Kreskowiak4-Jun-07 6:44
mveDave Kreskowiak4-Jun-07 6:44 
QuestionHow to unzip a pkzip file with sharpziplib? Pin
JSThomas4-Jun-07 6:24
JSThomas4-Jun-07 6:24 
QuestionEdit menu item Pin
jds12074-Jun-07 5:04
jds12074-Jun-07 5:04 
AnswerRe: Edit menu item Pin
jwlc764-Jun-07 5:40
jwlc764-Jun-07 5:40 
QuestionVB.Net Pin
SekharOne4-Jun-07 4:31
SekharOne4-Jun-07 4:31 
AnswerRe: VB.Net Pin
leckey4-Jun-07 5:27
leckey4-Jun-07 5:27 
QuestionError updating Dataset to Reflect into the Original Table Pin
Vimalsoft(Pty) Ltd4-Jun-07 4:13
professionalVimalsoft(Pty) Ltd4-Jun-07 4:13 
AnswerRe: Error updating Dataset to Reflect into the Original Table Pin
Dave Kreskowiak4-Jun-07 6:35
mveDave Kreskowiak4-Jun-07 6:35 
GeneralRe: Error updating Dataset to Reflect into the Original Table Pin
Vimalsoft(Pty) Ltd4-Jun-07 21:12
professionalVimalsoft(Pty) Ltd4-Jun-07 21:12 
GeneralRe: Error updating Dataset to Reflect into the Original Table Pin
Dave Kreskowiak6-Jun-07 16:30
mveDave Kreskowiak6-Jun-07 16:30 
QuestionProgress indicator Pin
DanB19834-Jun-07 3:56
DanB19834-Jun-07 3:56 
AnswerRe: Progress indicator Pin
Dave Kreskowiak4-Jun-07 6:38
mveDave Kreskowiak4-Jun-07 6:38 
AnswerRe: Progress indicator Pin
Thomas Stockwell4-Jun-07 8:22
professionalThomas Stockwell4-Jun-07 8:22 
QuestionVBA Excel Help Pin
Duane in Japan4-Jun-07 3:50
Duane in Japan4-Jun-07 3:50 
QuestionAfter sorting in a DataGridView the Row.EndEdit causes row change Pin
Marcus J. Smith4-Jun-07 2:36
professionalMarcus J. Smith4-Jun-07 2:36 
AnswerRe: After sorting in a DataGridView the Row.EndEdit causes row change Pin
Dave Kreskowiak4-Jun-07 9:01
mveDave Kreskowiak4-Jun-07 9:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.