Author Topic: Obsolete warnings ... various  (Read 13061 times)

0 Members and 1 Guest are viewing this topic.

Gasty

  • Newt
  • Posts: 90
Re: Obsolete warnings ... various
« Reply #15 on: November 04, 2011, 06:28:14 PM »
Hi,

As for the VS confusing db tables and acad tables, that can be avoided using an alias, like:

using fTable = Autodesk.AutoCAD.DatabaseServices.Table

-gnb

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Obsolete warnings ... various
« Reply #16 on: November 04, 2011, 06:37:02 PM »

Welcome to theSwamp Gasty.

Yes, using an alias works fine locally ... though I've had no issue with the compiler understanding the Class.

My issue is with 'google' and desktop searches for the word 'Table'.

... probably just a personal problem :)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Re: Obsolete warnings ... various
« Reply #17 on: November 04, 2011, 10:29:17 PM »
IMHO, some warnings are just to keep the newbie's out of trouble.
For Tables,  I see no issue with setting the number of rows and columns when creating a table, it's the subsequent calls  that can cause problems.  A safer and more generic way to "add" rows & columns would be.

Code: [Select]
tb.InsertRows( tb.Rows.Count, rowHeight, numRows - tb.Rows.Count);
tb.InsertColumns(tb.Columns.Count, colWidth, numCols - tb.Columns.Count);

in fact, this might make a good extension method. (Add)

I do like the newer style, its more dataset like

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Obsolete warnings ... various
« Reply #18 on: November 04, 2011, 10:31:29 PM »
< ... >
in fact, this might make a good extension method. (Add)

I do like the newer style, its more dataset like

yes,   and I like it too.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: Obsolete warnings ... various
« Reply #19 on: November 07, 2011, 12:53:32 PM »
Hi,

As for the VS confusing db tables and acad tables, that can be avoided using an alias, like:

using fTable = Autodesk.AutoCAD.DatabaseServices.Table

-gnb
Welcome indeed!
I hadn't thought of that. Thank you.

BTW - This is only an issue if you are "using" both Autodesk.AutoCAD.DatabaseServices and System.Data in the same class.
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions